package fallingGame;

/**
 * <p>
 * Title: GameObject
 * </p>
 * <p>
 * Description: CS 343 Course Project GameObject is a generic, simple class that
 * has dimensions, position, and velocity.
 * </p>
 * 
 * @author Nathanial Howard, Joe Costello, Dustin Schwingle, Jared Potter
 * @email nathanial.howard@my.uwrf.edu, anthony.costello@my.uwrf.edu,
 *        dustin.schwingle@my.uwrf.edu, jared.potter@my.uwrf.edu
 * @date December 01, 2011
 * @team Group 2
 */
public class GameObject {

	private float x_vel, y_vel;
	private float x, y;
	private int width, height;
	private boolean active;

	/**
	 * GameObject
	 * 
	 * default constructor
	 * 
	 * @ensure Game Object's x, y, width, and height will be initialized to 0
	 */
	public GameObject() {
		x = 0.0f;
		y = 0.0f;
		width = 0;
		height = 0;
	}

	/**
	 * getX
	 * 
	 * getter for x
	 * 
	 * @return this object's x value
	 * @ensure x will be returned
	 */
	public float getX() {
		return x;
	}

	/**
	 * setX
	 * 
	 * setter for X
	 * 
	 * @param x
	 *            - set x to this float value.
	 * @ensure this.x = x
	 */
	public void setX(float x) {
		this.x = x;
	}

	/**
	 * getY
	 * 
	 * getter for y
	 * 
	 * @return - float y value of the GameObject.
	 * @ensure y will be returned
	 */
	public float getY() {
		return y;
	}

	/**
	 * setY
	 * 
	 * setter for y
	 * 
	 * @param y
	 *            - set y to this float value.
	 * @ensure this.y = y
	 */
	public void setY(float y) {
		this.y = y;
	}

	/**
	 * getWidth
	 * 
	 * getter for width
	 * 
	 * @return - int width of the GameOBject to be used by collision detection.
	 * @ensure width will be returned
	 */
	public int getWidth() {
		return width;
	}

	/**
	 * setWidth
	 * 
	 * setter for width
	 * 
	 * @param w
	 *            - set width to this int.
	 * @ensure this.w = w;
	 */
	public void setWidth(int w) {
		this.width = w;
	}

	/**
	 * getHeight
	 * 
	 * getter for height
	 * 
	 * @return - int height of this GameObject.
	 * @ensure height is returned
	 */
	public int getHeight() {
		return height;
	}

	/**
	 * setHeight
	 * 
	 * setter for height
	 * 
	 * @param h
	 *            - set height to this int.
	 * @ensure this.h = h
	 */
	public void setHeight(int h) {
		this.height = h;
	}

	/**
	 * getX_vel
	 * 
	 * getter for x_vel
	 * 
	 * @return x_vel - float X Velocity of this GameObject
	 * @ensure x_vel will be returned
	 */
	public float getX_vel() {
		return x_vel;
	}

	/**
	 * setX_vel
	 * 
	 * setter for x_vel
	 * 
	 * @param x_vel
	 *            - set X Velocity to this float value.
	 * @ensure this.x_vel = x_vel
	 */
	public void setX_vel(float x_vel) {
		this.x_vel = x_vel;
	}

	/**
	 * getY_vel
	 * 
	 * getter for y_vel
	 * 
	 * @return y_vel - float Y Velocity of this GameObject
	 * @ensure y_vel will be returned
	 */
	public float getY_vel() {
		return y_vel;
	}

	/**
	 * setY_vel
	 * 
	 * setter for y_vel
	 * 
	 * @param y_vel
	 *            - set the Y Velocity to this float value.
	 * @ensure this.y_vel = y_vel
	 */
	public void setY_vel(float y_vel) {
		this.y_vel = y_vel;
	}

	/**
	 * isActive
	 * 
	 * getter for active
	 * 
	 * @return active - boolean telling if this GameObject is active.
	 * @ensure active will be returned
	 */
	public boolean isActive() {
		return active;
	}

	/**
	 * setActive
	 * 
	 * setter for active
	 * 
	 * @param active
	 *            - Set the active status of this GameObject to this boolean.
	 * @ensure this.active = active
	 */
	public void setActive(boolean active) {
		this.active = active;
	}
}
